<?php 
$a=array("Dog","Cat","Horse");
echo array_pop($a);